home *** CD-ROM | disk | FTP | other *** search
/ Amiga Collections: Purity / Purity #34 (1994-08)(Diesel)(DE)[WB].zip / Purity #34 (1994-08)(Diesel)(DE)[WB].adf / IncludesPCQ / Intuition.i < prev    next >
Text File  |  1994-08-06  |  66KB  |  1,755 lines

  1. { Intuition.i }
  2.  
  3.  
  4. {$I   "Include:Exec/Types.i"}
  5. {$I   "Include:Graphics/Gfx.i"}
  6. {$I   "Include:Graphics/Clip.i"}
  7. {$I   "Include:Graphics/View.i"}
  8. {$I   "Include:Graphics/RastPort.i"}
  9. {$I   "Include:Graphics/Layers.i"}
  10. {$I   "Include:Graphics/Text.i"}
  11. {$I   "Include:Exec/Ports.i"}
  12. {$I   "Include:Devices/InputEvent.i"}
  13. {$I   "Include:Utility/TagItem.i"}
  14. {
  15.  * NOTE:  intuition/iobsolete.h is included at the END of this file!
  16.  }
  17.  
  18. { ======================================================================== }
  19. { === IntuiText ========================================================== }
  20. { ================================= ======================================= }
  21. { IntuiText is a series of strings that start with a screen location
  22.  *  (always relative to the upper-left corner of something) and then the
  23.  *  text of the string.  The text is null-terminated.
  24.  }
  25. Type
  26.     IntuiText = record
  27.         FrontPen,
  28.         BackPen         : Byte;         { the pen numbers for the rendering }
  29.         DrawMode        : Byte;         { the mode for rendering the text }
  30.         LeftEdge        : Short;        { relative start location for the text }
  31.         TopEdge         : Short;        { relative start location for the text }
  32.         ITextFont       : TextAttrPtr;  { if NULL, you accept the default }
  33.         IText           : String;       { pointer to null-terminated text }
  34.         NextText        : ^IntuiText;   { continuation to TxWrite another text }
  35.     end;
  36.     IntuiTextPtr = ^IntuiText;
  37.  
  38.  
  39.  
  40. { ======================================================================== }
  41. { === Border ============================================================= }
  42. { ======================================================================== }
  43. { Data type Border, used for drawing a series of lines which is intended for
  44.  *  use as a border drawing, but which may, in fact, be used to render any
  45.  *  arbitrary vector shape.
  46.  *  The routine DrawBorder sets up the RastPort with the appropriate
  47.  *  variables, then does a Move to the first coordinate, then does Draws
  48.  *  to the subsequent coordinates.
  49.  *  After all the Draws are done, if NextBorder is non-zero we call DrawBorder
  50.  *  recursively
  51.  }
  52. Type
  53.     Border = record
  54.         LeftEdge,
  55.         TopEdge         : Short;        { initial offsets from the origin }
  56.         FrontPen,
  57.         BackPen         : Byte;         { pens numbers for rendering }
  58.         DrawMode        : Byte;         { mode for rendering }
  59.         Count           : Byte;         { number of XY pairs }
  60.         XY              : Address;      { vector coordinate pairs rel to LeftTop}
  61.         NextBorder      : ^Border;      { pointer to any other Border too }
  62.     end;
  63.     BorderPtr = ^Border;
  64.  
  65.  
  66.  
  67.  
  68. Type
  69.  
  70. { ======================================================================== }
  71. { === MenuItem =========================================================== }
  72. { ======================================================================== }
  73.  
  74. Type
  75.  
  76.     MenuItem = record
  77.         NextItem        : ^MenuItem;    { pointer to next in chained list }
  78.         LeftEdge,
  79.         TopEdge         : Short;        { position of the select box }
  80.         Width,
  81.         Height          : Short;        { dimensions of the select box }
  82.         Flags           : Short;        { see the defines below }
  83.  
  84.         MutualExclude   : Integer;      { set bits mean this item excludes that }
  85.  
  86.         ItemFill        : Address;      { points to Image, IntuiText, or NULL }
  87.  
  88.     { when this item is pointed to by the cursor and the items highlight
  89.      *  mode HIGHIMAGE is selected, this alternate image will be displayed
  90.      }
  91.  
  92.         SelectFill      : Address;      { points to Image, IntuiText, or NULL }
  93.  
  94.         Command         : Char;         { only if appliprog sets the COMMSEQ flag }
  95.  
  96.         SubItem         : ^MenuItem;    { if non-zero, DrawMenu shows "->" }
  97.  
  98.     { The NextSelect field represents the menu number of next selected
  99.      *  item (when user has drag-selected several items)
  100.      }
  101.  
  102.         NextSelect      : Short;
  103.     end;
  104.     MenuItemPtr = ^MenuItem;
  105.  
  106.  
  107. Const
  108.  
  109. { FLAGS SET BY THE APPLIPROG }
  110.     CHECKIT     = $0001;        { whether to check this item if selected }
  111.     ITEMTEXT    = $0002;        { set if textual, clear if graphical item }
  112.     COMMSEQ     = $0004;        { set if there's an command sequence }
  113.     MENUTOGGLE  = $0008;        { set to toggle the check of a menu item }
  114.     ITEMENABLED = $0010;        { set if this item is enabled }
  115.  
  116. { these are the SPECIAL HIGHLIGHT FLAG state meanings }
  117.     HIGHFLAGS   = $00C0;        { see definitions below for these bits }
  118.     HIGHIMAGE   = $0000;        { use the user's "select image" }
  119.     HIGHCOMP    = $0040;        { highlight by complementing the selectbox }
  120.     HIGHBOX     = $0080;        { highlight by "boxing" the selectbox }
  121.     HIGHNONE    = $00C0;        { don't highlight }
  122.  
  123. { FLAGS SET BY BOTH APPLIPROG AND INTUITION }
  124.     CHECKED     = $0100;        { if CHECKIT, then set this when selected }
  125.  
  126. { FLAGS SET BY INTUITION }
  127.     ISDRAWN     = $1000;        { this item's subs are currently drawn }
  128.     HIGHITEM    = $2000;        { this item is currently highlighted }
  129.     MENUTOGGLED = $4000;        { this item was already toggled }
  130.  
  131.  
  132. { ======================================================================== }
  133. { === Menu =============================================================== }
  134. { ======================================================================== }
  135. Type
  136.  
  137.     Menu = record
  138.         NextMenu        : ^Menu;        { same level }
  139.         LeftEdge,
  140.         TopEdge         : Short;        { position of the select box }
  141.         Width,
  142.         Height          : Short;        { dimensions of the select box }
  143.         Flags           : Short;        { see flag definitions below }
  144.         MenuName        : String;       { text for this Menu Header }
  145.         FirstItem       : MenuItemPtr;  { pointer to first in chain }
  146.  
  147.     { these mysteriously-named variables are for internal use only }
  148.  
  149.         JazzX,
  150.         JazzY,
  151.         BeatX,
  152.         BeatY           : Short;
  153.     end;
  154.     MenuPtr = ^Menu;
  155.  
  156. CONST
  157. { FLAGS SET BY BOTH THE APPLIPROG AND INTUITION }
  158.     MENUENABLED = $0001;        { whether or not this menu is enabled }
  159.  
  160. { FLAGS SET BY INTUITION }
  161.     MIDRAWN     = $0100;        { this menu's items are currently drawn }
  162.  
  163.  
  164.  
  165.  
  166. { ======================================================================== }
  167. { === Gadget ============================================================= }
  168. { ======================================================================== }
  169.  
  170. Type
  171.  
  172.     Gadget = record
  173.         NextGadget      : ^Gadget;      { next gadget in the list }
  174.  
  175.         LeftEdge,
  176.         TopEdge         : Short;        { "hit box" of gadget }
  177.         Width,
  178.         Height          : Short;        { "hit box" of gadget }
  179.  
  180.         Flags           : Short;        { see below for list of defines }
  181.  
  182.         Activation      : Short;        { see below for list of defines }
  183.  
  184.         GadgetType      : Short;        { see below for defines }
  185.  
  186.     { appliprog can specify that the Gadget be rendered as either as Border
  187.      * or an Image.  This variable points to which (or equals NULL if there's
  188.      * nothing to be rendered about this Gadget)
  189.      }
  190.  
  191.         GadgetRender    : Address;
  192.  
  193.     { appliprog can specify "highlighted" imagery rather than algorithmic
  194.      * this can point to either Border or Image data
  195.      }
  196.  
  197.         SelectRender    : Address;
  198.  
  199.         GadgetText      : IntuiTextPtr; { text for this gadget }
  200.  
  201.     { by using the MutualExclude word, the appliprog can describe
  202.      * which gadgets mutually-exclude which other ones.  The bits
  203.      * in MutualExclude correspond to the gadgets in object containing
  204.      * the gadget list.  If this gadget is selected and a bit is set
  205.      * in this gadget's MutualExclude and the gadget corresponding to
  206.      * that bit is currently selected (e.g. bit 2 set and gadget 2
  207.      * is currently selected) that gadget must be unselected.
  208.      * Intuition does the visual unselecting (with checkmarks) and
  209.      * leaves it up to the program to unselect internally
  210.      }
  211.  
  212.         MutualExclude   : Integer;      { set bits mean this gadget excludes that gadget }
  213.  
  214.     { pointer to a structure of special data required by Proportional,
  215.      * String and Integer Gadgets
  216.      }
  217.  
  218.         SpecialInfo     : Address;
  219.  
  220.         GadgetID        : Short;        { user-definable ID field }
  221.         UserData        : Address;      { ptr to general purpose User data (ignored by In) }
  222.     end;
  223.     GadgetPtr = ^Gadget;
  224.  
  225. CONST
  226. { --- Gadget.Flags values      --- }
  227. { combinations in these bits describe the highlight technique to be used }
  228.  GFLG_GADGHIGHBITS  = $0003;
  229.  GFLG_GADGHCOMP     = $0000;  { Complement the select box }
  230.  GFLG_GADGHBOX      = $0001;  { Draw a box around the image }
  231.  GFLG_GADGHIMAGE    = $0002;  { Blast in this alternate image }
  232.  GFLG_GADGHNONE     = $0003;  { don't highlight }
  233.  
  234.  GFLG_GADGIMAGE     = $0004;  { set IF GadgetRender AND SelectRender
  235.                                    * point to an Image structure, clear
  236.                                    * if they point to Border structures
  237.                                    }
  238.  
  239. { combinations in these next two bits specify to which corner the gadget's
  240.  *  Left & Top coordinates are relative.  If relative to Top/Left,
  241.  *  these are "normal" coordinates (everything is relative to something in
  242.  *  this universe).
  243.  *
  244.  * Gadget positions and dimensions are relative to the window or
  245.  * requester which contains the gadget
  246.  }
  247.  GFLG_RELBOTTOM   = $0008;  { vert. pos. is relative to bottom edge }
  248.  GFLG_RELRIGHT    = $0010;  { horiz. pos. is relative to right edge }
  249.  GFLG_RELWIDTH    = $0020;  { width is relative to req/window    }
  250.  GFLG_RELHEIGHT   = $0040;  { height is relative to req/window   }
  251.  
  252.  GFLG_SELECTED    = $0080;  { you may initialize AND look at this        }
  253.  
  254. { the GFLG_DISABLED flag is initialized by you and later set by Intuition
  255.  * according to your calls to On/OffGadget().  It specifies whether or not
  256.  * this Gadget is currently disabled from being selected
  257.  }
  258.  GFLG_DISABLED    = $0100;
  259.  
  260. { These flags specify the type of text field that Gadget.GadgetText
  261.  * points to.  In all normal (pre-V36) gadgets which you initialize
  262.  * this field should always be zero.  Some types of gadget objects
  263.  * created from classes will use these fields to keep track of
  264.  * types of labels/contents that different from IntuiText, but are
  265.  * stashed in GadgetText.
  266.  }
  267.  
  268.  GFLG_LABELMASK   = $3000;
  269.  GFLG_LABELITEXT  = $0000;  { GadgetText points to IntuiText     }
  270.  GFLG_LABELSTRING = $1000;  { GadgetText points to (UBYTE *)     }
  271.  GFLG_LABELIMAGE  = $2000;  { GadgetText points to Image (object)        }
  272.  
  273. { New for V37: GFLG_TABCYCLE }
  274.  GFLG_TABCYCLE    = $0200;  { (string OR custom) gadget participates in
  275.                                    * cycling activation with Tab or Shift-Tab
  276.                                    }
  277. { New for V37: GFLG_STRINGEXTEND.  We discovered that V34 doesn't properly
  278.  * ignore the value we had chosen for the Gadget->Activation flag
  279.  * GACT_STRINGEXTEND.  NEVER SET THAT FLAG WHEN RUNNING UNDER V34.
  280.  * The Gadget->Flags bit GFLG_STRINGEXTEND is provided as a synonym which is
  281.  * safe under V34, and equivalent to GACT_STRINGEXTEND under V37.
  282.  * (Note that the two flags are not numerically equal)
  283.  }
  284.  GFLG_STRINGEXTEND = $0400;  { this String Gadget has StringExtend        }
  285.  
  286. { ---  Gadget.Activation flag values   --- }
  287. { Set GACT_RELVERIFY if you want to verify that the pointer was still over
  288.  * the gadget when the select button was released.  Will cause
  289.  * an IDCMP_GADGETUP message to be sent if so.
  290.  }
  291.  GACT_RELVERIFY    = $0001;
  292.  
  293. { the flag GACT_IMMEDIATE, when set, informs the caller that the gadget
  294.  *  was activated when it was activated.  This flag works in conjunction with
  295.  *  the GACT_RELVERIFY flag
  296.  }
  297.  GACT_IMMEDIATE    = $0002;
  298.  
  299. { the flag GACT_ENDGADGET, when set, tells the system that this gadget,
  300.  * when selected, causes the Requester to be ended.  Requesters
  301.  * that are ended are erased and unlinked from the system.
  302.  }
  303.  GACT_ENDGADGET    = $0004;
  304.  
  305. { the GACT_FOLLOWMOUSE flag, when set, specifies that you want to receive
  306.  * reports on mouse movements while this gadget is active.
  307.  * You probably want to set the GACT_IMMEDIATE flag when using
  308.  * GACT_FOLLOWMOUSE, since that's the only reasonable way you have of
  309.  * learning why Intuition is suddenly sending you a stream of mouse
  310.  * movement events.  If you don't set GACT_RELVERIFY, you'll get at
  311.  * least one Mouse Position event.
  312.  }
  313.  GACT_FOLLOWMOUSE = $0008;
  314.  
  315. { if any of the BORDER flags are set in a Gadget that's included in the
  316.  * Gadget list when a Window is opened, the corresponding Border will
  317.  * be adjusted to make room for the Gadget
  318.  }
  319.  GACT_RIGHTBORDER = $0010;
  320.  GACT_LEFTBORDER  = $0020;
  321.  GACT_TOPBORDER   = $0040;
  322.  GACT_BOTTOMBORDER= $0080;
  323.  GACT_BORDERSNIFF = $8000;  { neither set nor rely on this bit   }
  324.  
  325.  GACT_TOGGLESELECT= $0100;  { this bit for toggle-select mode }
  326.  GACT_BOOLEXTEND  = $2000;  { this Boolean Gadget has a BoolInfo }
  327.  
  328. { should properly be in StringInfo, but aren't }
  329.  GACT_STRINGLEFT  = $0000;  { NOTE WELL: that this has value zero        }
  330.  GACT_STRINGCENTER= $0200;
  331.  GACT_STRINGRIGHT = $0400;
  332.  GACT_LONGINT     = $0800;  { this String Gadget is for Long Ints        }
  333.  GACT_ALTKEYMAP   = $1000;  { this String has an alternate keymap        }
  334.  GACT_STRINGEXTEND= $2000;  { this String Gadget has StringExtend        }
  335.                                   { NOTE: NEVER SET GACT_STRINGEXTEND IF YOU
  336.                                    * ARE RUNNING ON LESS THAN V36!  SEE
  337.                                    * GFLG_STRINGEXTEND (ABOVE) INSTEAD
  338.                                    }
  339.  
  340.  GACT_ACTIVEGADGET = $4000;  { this gadget is "active".  This flag
  341.                                    * is maintained by Intuition, and you
  342.                                    * cannot count on its value persisting
  343.                                    * while you do something on your program's
  344.                                    * task.  It can only be trusted by
  345.                                    * people implementing custom gadgets
  346.                                    }
  347.  
  348. { note $8000 is used above (GACT_BORDERSNIFF);
  349.  * all Activation flags defined }
  350.  
  351. { --- GADGET TYPES ------------------------------------------------------- }
  352. { These are the Gadget Type definitions for the variable GadgetType
  353.  * gadget number type MUST start from one.  NO TYPES OF ZERO ALLOWED.
  354.  * first comes the mask for Gadget flags reserved for Gadget typing
  355.  }
  356.  GTYP_GADGETTYPE = $FC00;  { all Gadget Global Type flags (padded) }
  357.  GTYP_SYSGADGET  = $8000;  { 1 = Allocated by the system, 0 = by app. }
  358.  GTYP_SCRGADGET  = $4000;  { 1 = ScreenGadget, 0 = WindowGadget }
  359.  GTYP_GZZGADGET  = $2000;  { 1 = for WFLG_GIMMEZEROZERO borders }
  360.  GTYP_REQGADGET  = $1000;  { 1 = this is a Requester Gadget }
  361. { system gadgets }
  362.  GTYP_SIZING     = $0010;
  363.  GTYP_WDRAGGING  = $0020;
  364.  GTYP_SDRAGGING  = $0030;
  365.  GTYP_WUPFRONT   = $0040;
  366.  GTYP_SUPFRONT   = $0050;
  367.  GTYP_WDOWNBACK  = $0060;
  368.  GTYP_SDOWNBACK  = $0070;
  369.  GTYP_CLOSE      = $0080;
  370. { application gadgets }
  371.  GTYP_BOOLGADGET = $0001;
  372.  GTYP_GADGET0002 = $0002;
  373.  GTYP_PROPGADGET = $0003;
  374.  GTYP_STRGADGET  = $0004;
  375.  GTYP_CUSTOMGADGET    =   $0005;
  376.  GTYP_GTYPEMASK  = $0007;  { masks out to gadget class    }
  377.  
  378. { This bit in GadgetType is reserved for undocumented internal use
  379.  * by the Gadget Toolkit, and cannot be used nor relied on by
  380.  * applications:        $0100;
  381.  }
  382.  
  383. { ======================================================================== }
  384. { === BoolInfo======================================================= }
  385. { ======================================================================== }
  386. { This is the special data needed by an Extended Boolean Gadget
  387.  * Typically this structure will be pointed to by the Gadget field SpecialInfo
  388.  }
  389. Type
  390.     BoolInfo = record
  391.         Flags   : Short;        { defined below }
  392.         Mask    : Address; { bit mask for highlighting and selecting
  393.                          * mask must follow the same rules as an Image
  394.                          * plane.  It's width and height are determined
  395.                          * by the width and height of the gadget's 
  396.                          * select box. (i.e. Gadget.Width and .Height).
  397.                          }
  398.         Reserved : Integer;     { set to 0      }
  399.     end;
  400.     BoolInfoPtr = ^BoolInfo;
  401.  
  402. Const
  403.  
  404. { set BoolInfo.Flags to this flag bit.
  405.  * in the future, additional bits might mean more stuff hanging
  406.  * off of BoolInfo.Reserved.
  407. }
  408.     BOOLMASK    = $0001;        { extension is for masked gadget }
  409.  
  410. { ======================================================================== }
  411. { === PropInfo =========================================================== }
  412. { ======================================================================== }
  413. { this is the special data required by the proportional Gadget
  414.  * typically, this data will be pointed to by the Gadget variable SpecialInfo
  415.  }
  416.  
  417. Type
  418.  
  419.     PropInfo = record
  420.         Flags   : Short;        { general purpose flag bits (see defines below) }
  421.  
  422.     { You initialize the Pot variables before the Gadget is added to 
  423.      * the system.  Then you can look here for the current settings 
  424.      * any time, even while User is playing with this Gadget.  To 
  425.      * adjust these after the Gadget is added to the System, use 
  426.      * ModifyProp();  The Pots are the actual proportional settings, 
  427.      * where a value of zero means zero and a value of MAXPOT means 
  428.      * that the Gadget is set to its maximum setting.  
  429.      }
  430.  
  431.         HorizPot        : WORD; { 16-bit FixedPoint horizontal quantity percentage }
  432.         VertPot         : WORD; { 16-bit FixedPoint vertical quantity percentage }
  433.  
  434.     { the 16-bit FixedPoint Body variables describe what percentage of 
  435.      * the entire body of stuff referred to by this Gadget is actually 
  436.      * shown at one time.  This is used with the AUTOKNOB routines, 
  437.      * to adjust the size of the AUTOKNOB according to how much of 
  438.      * the data can be seen.  This is also used to decide how far 
  439.      * to advance the Pots when User hits the Container of the Gadget.  
  440.      * For instance, if you were controlling the display of a 5-line 
  441.      * Window of text with this Gadget, and there was a total of 15 
  442.      * lines that could be displayed, you would set the VertBody value to 
  443.      *     (MAXBODY / (TotalLines / DisplayLines)) = MAXBODY / 3.
  444.      * Therefore, the AUTOKNOB would fill 1/3 of the container, and 
  445.      * if User hits the Cotainer outside of the knob, the pot would 
  446.      * advance 1/3 (plus or minus) If there's no body to show, or 
  447.      * the total amount of displayable info is less than the display area, 
  448.      * set the Body variables to the MAX.  To adjust these after the 
  449.      * Gadget is added to the System, use ModifyProp();  
  450.      }
  451.  
  452.         HorizBody       : Short;        { horizontal Body } 
  453.         VertBody        : Short;        { vertical Body }
  454.  
  455.     { these are the variables that Intuition sets and maintains }
  456.  
  457.         CWidth          : Short;        { Container width (with any relativity absoluted) }
  458.         CHeight         : Short;        { Container height (with any relativity absoluted) }
  459.         HPotRes,
  460.         VPotRes         : Short;        { pot increments }
  461.         LeftBorder      : Short;        { Container borders }
  462.         TopBorder       : Short;        { Container borders }
  463.     end;
  464.     PropInfoPtr = ^PropInfo;
  465.  
  466. CONST
  467. { --- FLAG BITS ---------------------------------------------------------- }
  468.  AUTOKNOB     =   $0001;  { this flag sez:  gimme that old auto-knob }
  469. { NOTE: if you do not use an AUTOKNOB for a proportional gadget,
  470.  * you are currently limited to using a single Image of your own
  471.  * design: Intuition won't handle a linked list of images as
  472.  * a proportional gadget knob.
  473.  }
  474.  
  475.  FREEHORIZ     =  $0002;  { IF set, the knob can move horizontally }
  476.  FREEVERT      =  $0004;  { IF set, the knob can move vertically }
  477.  PROPBORDERLESS =  $0008;  { IF set, no border will be rendered }
  478.  KNOBHIT       =  $0100;  { set when this Knob is hit }
  479.  PROPNEWLOOK   =  $0010;  { set this IF you want to get the new
  480.                                  * V36 look
  481.                                  }
  482.  
  483.  KNOBHMIN      =  6;       { minimum horizontal size of the Knob }
  484.  KNOBVMIN      =  4;       { minimum vertical size of the Knob }
  485.  MAXBODY       =  $FFFF;  { maximum body value }
  486.  MAXPOT        =  $FFFF;  { maximum pot value }
  487.  
  488. { ======================================================================== }
  489. { === StringInfo ========================================================= }
  490. { ======================================================================== }
  491. { this is the special data required by the string Gadget
  492.  * typically, this data will be pointed to by the Gadget variable SpecialInfo
  493.  }
  494.  
  495. Type
  496.  
  497.     StringInfo = record
  498.     { you initialize these variables, and then Intuition maintains them }
  499.         Buffer          : String;       { the buffer containing the start and final string }
  500.         UndoBuffer      : String;       { optional buffer for undoing current entry }
  501.         BufferPos       : Short;        { character position in Buffer }
  502.         MaxChars        : Short;        { max number of chars in Buffer (including NULL) }
  503.         DispPos         : Short;        { Buffer position of first displayed character }
  504.  
  505.     { Intuition initializes and maintains these variables for you }
  506.  
  507.         UndoPos         : Short;        { character position in the undo buffer }
  508.         NumChars        : Short;        { number of characters currently in Buffer }
  509.         DispCount       : Short;        { number of whole characters visible in Container }
  510.         CLeft,
  511.         CTop            : Short;        { topleft offset of the container }
  512.         Layer           : LayerPtr;     { the RastPort containing this Gadget }
  513.  
  514.     { you can initialize this variable before the gadget is submitted to
  515.      * Intuition, and then examine it later to discover what integer 
  516.      * the user has entered (if the user never plays with the gadget, 
  517.      * the value will be unchanged from your initial setting)
  518.      }
  519.  
  520.         LongInt         : Integer;
  521.  
  522.     { If you want this Gadget to use your own Console keymapping, you
  523.      * set the ALTKEYMAP bit in the Activation flags of the Gadget, and then
  524.      * set this variable to point to your keymap.  If you don't set the
  525.      * ALTKEYMAP, you'll get the standard ASCII keymapping.
  526.      }
  527.  
  528.         AltKeyMap       : Address;
  529.     end;
  530.     StringInfoPtr = ^StringInfo;
  531.  
  532.  
  533. { ======================================================================== }
  534. { === Requester ========================================================== }
  535. { ======================================================================== }
  536.  
  537. Type
  538.  
  539.     Requester = record
  540.     { the ClipRect and BitMap and used for rendering the requester }
  541.         OlderRequest    : ^Requester;
  542.         LeftEdge,
  543.         TopEdge         : Short;        { dimensions of the entire box }
  544.         Width,
  545.         Height          : Short;        { dimensions of the entire box }
  546.         RelLeft,
  547.         RelTop          : Short;        { for Pointer relativity offsets }
  548.  
  549.         ReqGadget       : GadgetPtr;    { pointer to a list of Gadgets }
  550.         ReqBorder       : BorderPtr;    { the box's border }
  551.         ReqText         : IntuiTextPtr; { the box's text }
  552.         Flags           : Short;        { see definitions below }
  553.  
  554.     { pen number for back-plane fill before draws }
  555.  
  556.         BackFill        : Byte;
  557.  
  558.     { Layer in place of clip rect       }
  559.  
  560.         ReqLayer        : LayerPtr;
  561.  
  562.         ReqPad1         : Array [0..31] of Byte;
  563.  
  564.     { If the BitMap plane pointers are non-zero, this tells the system
  565.      * that the image comes pre-drawn (if the appliprog wants to define
  566.      * it's own box, in any shape or size it wants!);  this is OK by
  567.      * Intuition as long as there's a good correspondence between
  568.      * the image and the specified Gadgets
  569.      }
  570.  
  571.         ImageBMap       : BitMapPtr;    { points to the BitMap of PREDRAWN imagery }
  572.         RWindow         : Address;      { added.  points back to Window }
  573.         ReqPad2         : Array [0..35] of Byte;
  574.     end;
  575.     RequesterPtr = ^Requester;
  576.  
  577.  
  578. Const
  579.  
  580. { FLAGS SET BY THE APPLIPROG }
  581.     POINTREL            = $0001;    { if POINTREL set, TopLeft is relative to pointer}
  582.     PREDRAWN            = $0002;    { if ReqBMap points to predrawn Requester imagery }
  583.     NOISYREQ            = $0004;    { if you don't want requester to filter input          }
  584.  
  585.     SIMPLEREQ           = $0010;
  586.         { to use SIMPLEREFRESH layer (recommended)     }
  587.  
  588.     { New for V36          }
  589.     USEREQIMAGE         = $0020;
  590.          {  render linked list ReqImage after BackFill
  591.          * but before gadgets and text
  592.          }
  593.     NOREQBACKFILL       = $0040;
  594.         { don't bother filling requester with Requester.BackFill pen   }
  595.  
  596.  
  597. { FLAGS SET BY INTUITION }
  598.     REQOFFWINDOW        = $1000;        { part of one of the Gadgets was offwindow }
  599.     REQACTIVE           = $2000;        { this requester is active }
  600.     SYSREQUEST          = $4000;        { this requester caused by system }
  601.     DEFERREFRESH        = $8000;        { this Requester stops a Refresh broadcast }
  602.  
  603.  
  604.  
  605.  
  606. { ======================================================================== }
  607. { === Image ============================================================== }
  608. { ======================================================================== }
  609. { This is a brief image structure for very simple transfers of 
  610.  * image data to a RastPort
  611.  }
  612.  
  613. Type
  614.  
  615.     Image = record
  616.         LeftEdge        : Short;        { starting offset relative to some origin }
  617.         TopEdge         : Short;        { starting offsets relative to some origin }
  618.         Width           : Short;        { pixel size (though data is word-aligned) }
  619.         Height,
  620.         Depth           : Short;        { pixel sizes }
  621.         ImageData       : Address;      { pointer to the actual word-aligned bits }
  622.  
  623.     { the PlanePick and PlaneOnOff variables work much the same way as the
  624.      * equivalent GELS Bob variables.  It's a space-saving 
  625.      * mechanism for image data.  Rather than defining the image data
  626.      * for every plane of the RastPort, you need define data only 
  627.      * for the planes that are not entirely zero or one.  As you 
  628.      * define your Imagery, you will often find that most of the planes 
  629.      * ARE just as color selectors.  For instance, if you're designing 
  630.      * a two-color Gadget to use colors two and three, and the Gadget 
  631.      * will reside in a five-plane display, bit plane zero of your 
  632.      * imagery would be all ones, bit plane one would have data that 
  633.      * describes the imagery, and bit planes two through four would be 
  634.      * all zeroes.  Using these flags allows you to avoid wasting all 
  635.      * that memory in this way:  first, you specify which planes you 
  636.      * want your data to appear in using the PlanePick variable.  For 
  637.      * each bit set in the variable, the next "plane" of your image 
  638.      * data is blitted to the display.  For each bit clear in this 
  639.      * variable, the corresponding bit in PlaneOnOff is examined.  
  640.      * If that bit is clear, a "plane" of zeroes will be used.  
  641.      * If the bit is set, ones will go out instead.  So, for our example:
  642.      *   Gadget.PlanePick = 0x02;
  643.      *   Gadget.PlaneOnOff = 0x01;
  644.      * Note that this also allows for generic Gadgets, like the 
  645.      * System Gadgets, which will work in any number of bit planes.  
  646.      * Note also that if you want an Image that is only a filled 
  647.      * rectangle, you can get this by setting PlanePick to zero 
  648.      * (pick no planes of data) and set PlaneOnOff to describe the pen 
  649.      * color of the rectangle.  
  650.      }
  651.  
  652.         PlanePick,
  653.         PlaneOnOff      : Byte;
  654.  
  655.     { if the NextImage variable is not NULL, Intuition presumes that 
  656.      * it points to another Image structure with another Image to be 
  657.      * rendered
  658.      }
  659.  
  660.         NextImage       : ^Image;
  661.     end;
  662.     ImagePtr = ^Image;
  663.  
  664.  
  665. { ======================================================================== }
  666. { === IntuiMessage ======================================================= }
  667. { ======================================================================== }
  668.  
  669. Type
  670.  
  671.     IntuiMessage = record
  672.         ExecMessage     : Message;
  673.  
  674.     { the Class bits correspond directly with the IDCMP Flags, except for the
  675.      * special bit LONELYMESSAGE (defined below)
  676.      }
  677.  
  678.         Class           : Integer;
  679.  
  680.     { the Code field is for special values like MENU number }
  681.  
  682.         Code            : Short;
  683.  
  684.     { the Qualifier field is a copy of the current InputEvent's Qualifier }
  685.  
  686.         Qualifier       : Short;
  687.  
  688.     { IAddress contains particular addresses for Intuition functions, like
  689.      * the pointer to the Gadget or the Screen
  690.      }
  691.  
  692.         IAddress        : Address;
  693.  
  694.     { when getting mouse movement reports, any event you get will have the
  695.      * the mouse coordinates in these variables.  the coordinates are relative
  696.      * to the upper-left corner of your Window (GIMMEZEROZERO notwithstanding)
  697.      }
  698.  
  699.         MouseX,
  700.         MouseY          : Short;
  701.  
  702.     { the time values are copies of the current system clock time.  Micros
  703.      * are in units of microseconds, Seconds in seconds.
  704.      }
  705.  
  706.         Seconds,
  707.         Micros          : Integer;
  708.  
  709.     { the IDCMPWindow variable will always have the address of the Window of 
  710.      * this IDCMP 
  711.      }
  712.  
  713.         IDCMPWindow     : Address;
  714.  
  715.     { system-use variable }
  716.  
  717.         SpecialLink     : ^IntuiMessage;
  718.     end;
  719.     IntuiMessagePtr = ^IntuiMessage;
  720.  
  721. CONST
  722.  
  723. { --- IDCMP Classes ------------------------------------------------------ }
  724. { Please refer to the Autodoc for OpenWindow() and to the Rom Kernel
  725.  * Manual for full details on the IDCMP classes.
  726.  }
  727.  IDCMP_SIZEVERIFY      =  $00000001;
  728.  IDCMP_NEWSIZE         =  $00000002;
  729.  IDCMP_REFRESHWINDOW   =  $00000004;
  730.  IDCMP_MOUSEBUTTONS    =  $00000008;
  731.  IDCMP_MOUSEMOVE       =  $00000010;
  732.  IDCMP_GADGETDOWN      =  $00000020;
  733.  IDCMP_GADGETUP        =  $00000040;
  734.  IDCMP_REQSET          =  $00000080;
  735.  IDCMP_MENUPICK        =  $00000100;
  736.  IDCMP_CLOSEWINDOW     =  $00000200;
  737.  IDCMP_RAWKEY          =  $00000400;
  738.  IDCMP_REQVERIFY       =  $00000800;
  739.  IDCMP_REQCLEAR        =  $00001000;
  740.  IDCMP_MENUVERIFY      =  $00002000;
  741.  IDCMP_NEWPREFS        =  $00004000;
  742.  IDCMP_DISKINSERTED    =  $00008000;
  743.  IDCMP_DISKREMOVED     =  $00010000;
  744.  IDCMP_WBENCHMESSAGE   =  $00020000;  {  System use only         }
  745.  IDCMP_ACTIVEWINDOW    =  $00040000;
  746.  IDCMP_INACTIVEWINDOW  =  $00080000;
  747.  IDCMP_DELTAMOVE       =  $00100000;
  748.  IDCMP_VANILLAKEY      =  $00200000;
  749.  IDCMP_INTUITICKS      =  $00400000;
  750. {  for notifications from "boopsi" gadgets     }
  751.  IDCMP_IDCMPUPDATE     =  $00800000;  { new for V36      }
  752. { for getting help key report during menu session      }
  753.  IDCMP_MENUHELP        =  $01000000;  { new for V36      }
  754. { for notification of any move/size/zoom/change window         }
  755.  IDCMP_CHANGEWINDOW    =  $02000000;  { new for V36      }
  756.  
  757. { NOTEZ-BIEN:                          $80000000 is reserved for internal use   }
  758.  
  759. { the IDCMP Flags do not use this special bit, which is cleared when
  760.  * Intuition sends its special message to the Task, and set when Intuition
  761.  * gets its Message back from the Task.  Therefore, I can check here to
  762.  * find out fast whether or not this Message is available for me to send
  763.  }
  764.  IDCMP_LONELYMESSAGE   =  $80000000;
  765.  
  766.  
  767. { --- IDCMP Codes -------------------------------------------------------- }
  768. { This group of codes is for the IDCMP_MENUVERIFY function }
  769.  MENUHOT       =  $0001;  { IntuiWants verification OR MENUCANCEL    }
  770.  MENUCANCEL    =  $0002;  { HOT Reply of this cancels Menu operation }
  771.  MENUWAITING   =  $0003;  { Intuition simply wants a ReplyMsg() ASAP }
  772.  
  773. { These are internal tokens to represent state of verification attempts
  774.  * shown here as a clue.
  775.  }
  776.  OKOK          =  MENUHOT; { guy didn't care                      }
  777.  OKABORT       =  $0004;  { window rendered question moot        }
  778.  OKCANCEL      =  MENUCANCEL; { window sent cancel reply          }
  779.  
  780. { This group of codes is for the IDCMP_WBENCHMESSAGE messages }
  781.  WBENCHOPEN    =  $0001;
  782.  WBENCHCLOSE   =  $0002;
  783.  
  784.  
  785. { A data structure common in V36 Intuition processing  }
  786. Type
  787.    IBox = Record
  788.     Left,
  789.     Top,
  790.     Width,
  791.     Height : Short;
  792.    END;
  793.    IBoxPtr = ^IBox;
  794.  
  795.  
  796. { ======================================================================== }
  797. { === Window ============================================================= }
  798. { ======================================================================== }
  799.  
  800. Type
  801.  
  802.     Window = record
  803.         NextWindow      : ^Window;      { for the linked list in a screen }
  804.  
  805.         LeftEdge,
  806.         TopEdge         : Short;        { screen dimensions of window }
  807.         Width,
  808.         Height          : Short;        { screen dimensions of window }
  809.  
  810.         MouseY,
  811.         MouseX          : Short;        { relative to upper-left of window }
  812.  
  813.         MinWidth,
  814.         MinHeight       : Short;        { minimum sizes }
  815.         MaxWidth,
  816.         MaxHeight       : Short;        { maximum sizes }
  817.  
  818.         Flags           : Integer;      { see below for defines }
  819.  
  820.         MenuStrip       : MenuPtr;      { the strip of Menu headers }
  821.  
  822.         Title           : String;       { the title text for this window }
  823.  
  824.         FirstRequest    : RequesterPtr; { all active Requesters }
  825.  
  826.         DMRequest       : RequesterPtr; { double-click Requester }
  827.  
  828.         ReqCount        : Short;        { count of reqs blocking Window }
  829.  
  830.         WScreen         : Address;      { this Window's Screen }
  831.         RPort           : RastPortPtr;  { this Window's very own RastPort }
  832.  
  833.     { the border variables describe the window border.   If you specify
  834.      * GIMMEZEROZERO when you open the window, then the upper-left of the
  835.      * ClipRect for this window will be upper-left of the BitMap (with correct
  836.      * offsets when in SuperBitMap mode; you MUST select GIMMEZEROZERO when
  837.      * using SuperBitMap).  If you don't specify ZeroZero, then you save
  838.      * memory (no allocation of RastPort, Layer, ClipRect and associated
  839.      * Bitmaps), but you also must offset all your writes by BorderTop,
  840.      * BorderLeft and do your own mini-clipping to prevent writing over the
  841.      * system gadgets
  842.      }
  843.  
  844.         BorderLeft,
  845.         BorderTop,
  846.         BorderRight,
  847.         BorderBottom    : Byte;
  848.         BorderRPort     : RastPortPtr;
  849.  
  850.  
  851.     { You supply a linked-list of Gadgets for your Window.
  852.      * This list DOES NOT include system gadgets.  You get the standard
  853.      * window system gadgets by setting flag-bits in the variable Flags (see
  854.      * the bit definitions below)
  855.      }
  856.  
  857.         FirstGadget     : GadgetPtr;
  858.  
  859.     { these are for opening/closing the windows }
  860.  
  861.         Parent,
  862.         Descendant      : ^Window;
  863.  
  864.     { sprite data information for your own Pointer
  865.      * set these AFTER you Open the Window by calling SetPointer()
  866.      }
  867.  
  868.         Pointer         : Address;      { sprite data }
  869.         PtrHeight       : Byte;         { sprite height (not including sprite padding) }
  870.         PtrWidth        : Byte;         { sprite width (must be less than or equal to 16) }
  871.         XOffset,
  872.         YOffset         : Byte;         { sprite offsets }
  873.  
  874.     { the IDCMP Flags and User's and Intuition's Message Ports }
  875.         IDCMPFlags      : Integer;      { User-selected flags }
  876.         UserPort,
  877.         WindowPort      : MsgPortPtr;
  878.         MessageKey      : IntuiMessagePtr;
  879.  
  880.         DetailPen,
  881.         BlockPen        : Byte; { for bar/border/gadget rendering }
  882.  
  883.     { the CheckMark is a pointer to the imagery that will be used when 
  884.      * rendering MenuItems of this Window that want to be checkmarked
  885.      * if this is equal to NULL, you'll get the default imagery
  886.      }
  887.  
  888.         CheckMark       : ImagePtr;
  889.  
  890.         ScreenTitle     : String; { if non-null, Screen title when Window is active }
  891.  
  892.     { These variables have the mouse coordinates relative to the 
  893.      * inner-Window of GIMMEZEROZERO Windows.  This is compared with the
  894.      * MouseX and MouseY variables, which contain the mouse coordinates
  895.      * relative to the upper-left corner of the Window, GIMMEZEROZERO
  896.      * notwithstanding
  897.      }
  898.  
  899.         GZZMouseX       : Short;
  900.         GZZMouseY       : Short;
  901.  
  902.     { these variables contain the width and height of the inner-Window of
  903.      * GIMMEZEROZERO Windows
  904.      }
  905.  
  906.         GZZWidth        : Short;
  907.         GZZHeight       : Short;
  908.  
  909.         ExtData         : Address;
  910.  
  911.         UserData        : Address;      { general-purpose pointer to User data extension }
  912.  
  913.     {* jimm: NEW: 11/18/85: this pointer keeps a duplicate of what 
  914.      * Window.RPort->Layer is _supposed_ to be pointing at
  915.      }
  916.  
  917.         WLayer          : LayerPtr;
  918.  
  919.     { jimm: NEW 1.2: need to keep track of the font that
  920.      * OpenWindow opened, in case user SetFont's into RastPort
  921.      }
  922.  
  923.         IFont           : TextFontPtr;
  924.     end;
  925.     WindowPtr = ^Window;
  926.  
  927. CONST
  928. { --- Flags requested at OpenWindow() time by the application --------- }
  929.  WFLG_SIZEGADGET   =  $00000001;  { include sizing system-gadget? }
  930.  WFLG_DRAGBAR      =  $00000002;  { include dragging system-gadget? }
  931.  WFLG_DEPTHGADGET  =  $00000004;  { include depth arrangement gadget? }
  932.  WFLG_CLOSEGADGET  =  $00000008;  { include close-box system-gadget? }
  933.  
  934.  WFLG_SIZEBRIGHT   =  $00000010;  { size gadget uses right border }
  935.  WFLG_SIZEBBOTTOM  =  $00000020;  { size gadget uses bottom border }
  936.  
  937. { --- refresh modes ------------------------------------------------------ }
  938. { combinations of the WFLG_REFRESHBITS select the refresh type }
  939.  WFLG_REFRESHBITS   = $000000C0;
  940.  WFLG_SMART_REFRESH = $00000000;
  941.  WFLG_SIMPLE_REFRESH= $00000040;
  942.  WFLG_SUPER_BITMAP  = $00000080;
  943.  WFLG_OTHER_REFRESH = $000000C0;
  944.  
  945.  WFLG_BACKDROP      = $00000100;  { this is a backdrop window }
  946.  
  947.  WFLG_REPORTMOUSE   = $00000200;  { to hear about every mouse move }
  948.  
  949.  WFLG_GIMMEZEROZERO = $00000400;  { a GimmeZeroZero window       }
  950.  
  951.  WFLG_BORDERLESS    = $00000800;  { to get a Window sans border }
  952.  
  953.  WFLG_ACTIVATE      = $00001000;  { when Window opens, it's Active }
  954.  
  955.  
  956. { FLAGS SET BY INTUITION }
  957.  WFLG_WINDOWACTIVE  = $00002000;  { this window is the active one }
  958.  WFLG_INREQUEST     = $00004000;  { this window is in request mode }
  959.  WFLG_MENUSTATE     = $00008000;  { Window is active with Menus on }
  960.  
  961. { --- Other User Flags --------------------------------------------------- }
  962.  WFLG_RMBTRAP       = $00010000;  { Catch RMB events for your own }
  963.  WFLG_NOCAREREFRESH = $00020000;  { not to be bothered with REFRESH }
  964.  
  965. { --- Other Intuition Flags ---------------------------------------------- }
  966.  WFLG_WINDOWREFRESH = $01000000;  { Window is currently refreshing }
  967.  WFLG_WBENCHWINDOW  = $02000000;  { WorkBench tool ONLY Window }
  968.  WFLG_WINDOWTICKED  = $04000000;  { only one timer tick at a time }
  969.  
  970.  
  971. { - V36 new Flags which the programmer may specify in NewWindow.Flags  }
  972.  WFLG_NW_EXTENDED   = $00040000;  { extension data provided      }
  973.                                         { see struct ExtNewWindow      }
  974.  
  975. { --- V36 Flags to be set only by Intuition -------------------------  }
  976.  WFLG_VISITOR       = $08000000;  { visitor window               }
  977.  WFLG_ZOOMED        = $10000000;  { identifies "zoom state"      }
  978.  WFLG_HASZOOM       = $20000000;  { windowhas a zoom gadget      }
  979.  
  980. { --- Other Window Values ---------------------------------------------- }
  981.  DEFAULTMOUSEQUEUE  =     (5);     { no more mouse messages       }
  982.  
  983. { --- see struct IntuiMessage for the IDCMP Flag definitions ------------- }
  984.  
  985.  
  986. { ======================================================================== }
  987. { === NewWindow ========================================================== }
  988. { ======================================================================== }
  989.  
  990. Type
  991.  
  992.     NewWindow = record
  993.         LeftEdge,
  994.         TopEdge         : Short;        { screen dimensions of window }
  995.         Width,
  996.         Height          : Short;        { screen dimensions of window }
  997.  
  998.         DetailPen,
  999.         BlockPen        : Byte;         { for bar/border/gadget rendering }
  1000.  
  1001.         IDCMPFlags      : Integer;      { User-selected IDCMP flags }
  1002.  
  1003.         Flags           : Integer;      { see Window struct for defines }
  1004.  
  1005.     { You supply a linked-list of Gadgets for your Window.
  1006.      *  This list DOES NOT include system Gadgets.  You get the standard
  1007.      *  system Window Gadgets by setting flag-bits in the variable Flags (see
  1008.      *  the bit definitions under the Window structure definition)
  1009.      }
  1010.  
  1011.         FirstGadget     : GadgetPtr;
  1012.  
  1013.     { the CheckMark is a pointer to the imagery that will be used when 
  1014.      * rendering MenuItems of this Window that want to be checkmarked
  1015.      * if this is equal to NULL, you'll get the default imagery
  1016.      }
  1017.  
  1018.         CheckMark       : ImagePtr;
  1019.  
  1020.         Title           : String;  { the title text for this window }
  1021.     
  1022.     { the Screen pointer is used only if you've defined a CUSTOMSCREEN and
  1023.      * want this Window to open in it.  If so, you pass the address of the
  1024.      * Custom Screen structure in this variable.  Otherwise, this variable
  1025.      * is ignored and doesn't have to be initialized.
  1026.      }
  1027.  
  1028.         Screen          : Address;
  1029.     
  1030.     { SUPER_BITMAP Window?  If so, put the address of your BitMap structure
  1031.      * in this variable.  If not, this variable is ignored and doesn't have 
  1032.      * to be initialized
  1033.      }
  1034.  
  1035.         BitMap          : BitMapPtr;
  1036.  
  1037.     { the values describe the minimum and maximum sizes of your Windows.
  1038.      * these matter only if you've chosen the WINDOWSIZING Gadget option,
  1039.      * which means that you want to let the User to change the size of 
  1040.      * this Window.  You describe the minimum and maximum sizes that the
  1041.      * Window can grow by setting these variables.  You can initialize
  1042.      * any one these to zero, which will mean that you want to duplicate
  1043.      * the setting for that dimension (if MinWidth == 0, MinWidth will be
  1044.      * set to the opening Width of the Window).
  1045.      * You can change these settings later using SetWindowLimits().
  1046.      * If you haven't asked for a SIZING Gadget, you don't have to
  1047.      * initialize any of these variables.
  1048.      }
  1049.  
  1050.         MinWidth,
  1051.         MinHeight       : Short;        { minimums }
  1052.         MaxWidth,
  1053.         MaxHeight       : Short;        { maximums }
  1054.  
  1055.     { the type variable describes the Screen in which you want this Window to
  1056.      * open.  The type value can either be CUSTOMSCREEN or one of the
  1057.      * system standard Screen Types such as WBENCHSCREEN.  See the
  1058.      * type definitions under the Screen structure
  1059.      }
  1060.  
  1061.         WType           : Short;        { is "Type" in C includes }
  1062.     end;
  1063.     NewWindowPtr = ^NewWindow;
  1064.  
  1065.  
  1066. { The following structure is the future NewWindow.  Compatibility
  1067.  * issues require that the size of NewWindow not change.
  1068.  * Data in the common part (NewWindow) indicates the the extension
  1069.  * fields are being used.
  1070.  * NOTE WELL: This structure may be subject to future extension.
  1071.  * Writing code depending on its size is not allowed.
  1072.  }
  1073.    ExtNewWindow = Record
  1074.     LeftEdge, TopEdge : Short;
  1075.     Width, Height : Short;
  1076.  
  1077.     DetailPen, BlockPen : Byte;
  1078.     IDCMPFlags    : Integer;
  1079.     Flags         : Integer;
  1080.     FirstGadget   : GadgetPtr;
  1081.  
  1082.     CheckMark     : ImagePtr;
  1083.  
  1084.     Title         : String;
  1085.     WScreen       : Address;
  1086.     WBitMap       : BitMapPtr;
  1087.  
  1088.     MinWidth, MinHeight : Short;
  1089.     MaxWidth, MaxHeight : Short;
  1090.  
  1091.     { the type variable describes the Screen in which you want this Window to
  1092.      * open.  The type value can either be CUSTOMSCREEN or one of the
  1093.      * system standard Screen Types such as WBENCHSCREEN.  See the
  1094.      * type definitions under the Screen structure.
  1095.      * A new possible value for this field is PUBLICSCREEN, which
  1096.      * defines the window as a 'visitor' window.  See below for
  1097.      * additional information provided.
  1098.      }
  1099.     WType  : Short;
  1100.  
  1101.     { ------------------------------------------------------- *
  1102.      * extensions for V36
  1103.      * if the NewWindow Flag value WFLG_NW_EXTENDED is set, then
  1104.      * this field is assumed to point to an array ( or chain of arrays)
  1105.      * of TagItem structures.  See also ExtNewScreen for another
  1106.      * use of TagItems to pass optional data.
  1107.      *
  1108.      * see below for tag values and the corresponding data.
  1109.      }
  1110.     Extension : TagItemPtr;
  1111.   END;
  1112.   ExtNewWindowPtr = ^ExtNewWindow;
  1113.  
  1114. {
  1115.  * The TagItem ID's (ti_Tag values) for OpenWindowTagList() follow.
  1116.  * They are values in a TagItem array passed as extension/replacement
  1117.  * values for the data in NewWindow.  OpenWindowTagList() can actually
  1118.  * work well with a NULL NewWindow pointer.
  1119.  }
  1120. CONST
  1121.  WA_Dummy     =   (TAG_USER + 99); { $80000063   }
  1122.  
  1123. { these tags simply override NewWindow parameters }
  1124.  WA_Left               =  (WA_Dummy + $01);
  1125.  WA_Top                =  (WA_Dummy + $02);
  1126.  WA_Width              =  (WA_Dummy + $03);
  1127.  WA_Height             =  (WA_Dummy + $04);
  1128.  WA_DetailPen          =  (WA_Dummy + $05);
  1129.  WA_BlockPen           =  (WA_Dummy + $06);
  1130.  WA_IDCMP              =  (WA_Dummy + $07);
  1131.                         { "bulk" initialization of NewWindow.Flags }
  1132.  WA_Flags              =  (WA_Dummy + $08);
  1133.  WA_Gadgets            =  (WA_Dummy + $09);
  1134.  WA_Checkmark          =  (WA_Dummy + $0A);
  1135.  WA_Title              =  (WA_Dummy + $0B);
  1136.                         { means you don't have to call SetWindowTitles
  1137.                          * after you open your window
  1138.                          }
  1139.  WA_ScreenTitle        =  (WA_Dummy + $0C);
  1140.  WA_CustomScreen       =  (WA_Dummy + $0D);
  1141.  WA_SuperBitMap        =  (WA_Dummy + $0E);
  1142.                         { also implies WFLG_SUPER_BITMAP property      }
  1143.  WA_MinWidth           =  (WA_Dummy + $0F);
  1144.  WA_MinHeight          =  (WA_Dummy + $10);
  1145.  WA_MaxWidth           =  (WA_Dummy + $11);
  1146.  WA_MaxHeight          =  (WA_Dummy + $12);
  1147.  
  1148. { The following are specifications for new features    }
  1149.  
  1150.  WA_InnerWidth         =  (WA_Dummy + $13);
  1151.  WA_InnerHeight        =  (WA_Dummy + $14);
  1152.                         { You can specify the dimensions of the interior
  1153.                          * region of your window, independent of what
  1154.                          * the border widths will be.  You probably want
  1155.                          * to also specify WA_AutoAdjust to allow
  1156.                          * Intuition to move your window or even
  1157.                          * shrink it so that it is completely on screen.
  1158.                          }
  1159.  
  1160.  WA_PubScreenName      =  (WA_Dummy + $15);
  1161.                         { declares that you want the window to open as
  1162.                          * a visitor on the public screen whose name is
  1163.                          * pointed to by (UBYTE *) ti_Data
  1164.                          }
  1165.  WA_PubScreen          =  (WA_Dummy + $16);
  1166.                         { open as a visitor window on the public screen
  1167.                          * whose address is in (struct Screen *) ti_Data.
  1168.                          * To ensure that this screen remains open, you
  1169.                          * should either be the screen's owner, have a
  1170.                          * window open on the screen, or use LockPubScreen().
  1171.                          }
  1172.  WA_PubScreenFallBack  =  (WA_Dummy + $17);
  1173.                         { A Boolean, specifies whether a visitor window
  1174.                          * should "fall back" to the default public screen
  1175.                          * (or Workbench) if the named public screen isn't
  1176.                          * available
  1177.                          }
  1178.  WA_WindowName         =  (WA_Dummy + $18);
  1179.                         { not implemented      }
  1180.  WA_Colors             =  (WA_Dummy + $19);
  1181.                         { a ColorSpec array for colors to be set
  1182.                          * when this window is active.  This is not
  1183.                          * implemented, and may not be, since the default
  1184.                          * values to restore would be hard to track.
  1185.                          * We'd like to at least support per-window colors
  1186.                          * for the mouse pointer sprite.
  1187.                          }
  1188.  WA_Zoom       =  (WA_Dummy + $1A);
  1189.                         { ti_Data points to an array of four WORD's,
  1190.                          * the initial Left/Top/Width/Height values of
  1191.                          * the "alternate" zoom position/dimensions.
  1192.                          * It also specifies that you want a Zoom gadget
  1193.                          * for your window, whether or not you have a
  1194.                          * sizing gadget.
  1195.                          }
  1196.  WA_MouseQueue         =  (WA_Dummy + $1B);
  1197.                         { ti_Data contains initial value for the mouse
  1198.                          * message backlog limit for this window.
  1199.                          }
  1200.  WA_BackFill           =  (WA_Dummy + $1C);
  1201.                         { unimplemented at present: provides a "backfill
  1202.                          * hook" for your window's layer.
  1203.                          }
  1204.  WA_RptQueue           =  (WA_Dummy + $1D);
  1205.                         { initial value of repeat key backlog limit    }
  1206.  
  1207.     { These Boolean tag items are alternatives to the NewWindow.Flags
  1208.      * boolean flags with similar names.
  1209.      }
  1210.  WA_SizeGadget         =  (WA_Dummy + $1E);
  1211.  WA_DragBar            =  (WA_Dummy + $1F);
  1212.  WA_DepthGadget        =  (WA_Dummy + $20);
  1213.  WA_CloseGadget        =  (WA_Dummy + $21);
  1214.  WA_Backdrop           =  (WA_Dummy + $22);
  1215.  WA_ReportMouse        =  (WA_Dummy + $23);
  1216.  WA_NoCareRefresh      =  (WA_Dummy + $24);
  1217.  WA_Borderless         =  (WA_Dummy + $25);
  1218.  WA_Activate           =  (WA_Dummy + $26);
  1219.  WA_RMBTrap            =  (WA_Dummy + $27);
  1220.  WA_WBenchWindow       =  (WA_Dummy + $28);       { PRIVATE!! }
  1221.  WA_SimpleRefresh      =  (WA_Dummy + $29);
  1222.                         { only specify if TRUE }
  1223.  WA_SmartRefresh       =  (WA_Dummy + $2A);
  1224.                         { only specify if TRUE }
  1225.  WA_SizeBRight         =  (WA_Dummy + $2B);
  1226.  WA_SizeBBottom        =  (WA_Dummy + $2C);
  1227.  
  1228.     { New Boolean properties   }
  1229.  WA_AutoAdjust         =  (WA_Dummy + $2D);
  1230.                         { shift or squeeze the window's position and
  1231.                          * dimensions to fit it on screen.
  1232.                          }
  1233.  
  1234.  WA_GimmeZeroZero      =  (WA_Dummy + $2E);
  1235.                         { equiv. to NewWindow.Flags WFLG_GIMMEZEROZERO }
  1236.  
  1237. { New for V37: WA_MenuHelp (ignored by V36) }
  1238.  WA_MenuHelp           =  (WA_Dummy + $2F);
  1239.                         { Enables IDCMP_MENUHELP:  Pressing HELP during menus
  1240.                          * will return IDCMP_MENUHELP message.
  1241.                          }
  1242.  
  1243.  
  1244.  
  1245. { ======================================================================== }
  1246. { === Remember =========================================================== }
  1247. { ======================================================================== }
  1248. { this structure is used for remembering what memory has been allocated to
  1249.  * date by a given routine, so that a premature abort or systematic exit
  1250.  * can deallocate memory cleanly, easily, and completely
  1251.  }
  1252.  
  1253. Type
  1254.  
  1255.     Remember = record
  1256.         NextRemember    : ^Remember;
  1257.         RememberSize    : Integer;
  1258.         Memory          : Address;
  1259.     end;
  1260.     RememberPtr = ^Remember;
  1261.  
  1262.  
  1263. { === Color Spec ====================================================== }
  1264. { How to tell Intuition about RGB values for a color table entry. }
  1265.  
  1266.   ColorSpec = Record
  1267.     ColorIndex  : Short;     { -1 terminates an array of ColorSpec  }
  1268.     Red         : Short;            { only 6 bits recognized in V36        }
  1269.     Green       : Short;          { only 6 bits recognized in V36        }
  1270.     Blue        : Short;           { only 6 bits recognized in V36        }
  1271.   END;
  1272.   ColorSpecPtr = ^ColorSpec;
  1273.  
  1274. { === Easy Requester Specification ======================================= }
  1275. { see also autodocs for EasyRequest and BuildEasyRequest       }
  1276. { NOTE: This structure may grow in size in the future          }
  1277.    EasyStruct = Record
  1278.     es_StructSize   : Integer;  { should be sizeof (struct EasyStruct )}
  1279.     es_Flags        : Integer;  { should be 0 for now                  }
  1280.     es_Title        : String;   { title of requester window            }
  1281.     es_TextFormat   : String;   { 'printf' style formatting string     }
  1282.     es_GadgetFormat : String;   { 'printf' style formatting string   }
  1283.    END;
  1284.    EasyStructPtr = ^EasyStruct;
  1285.  
  1286.  
  1287.  
  1288. { ======================================================================== }
  1289. { === Miscellaneous ====================================================== }
  1290. { ======================================================================== }
  1291. CONST
  1292. { = MENU STUFF =========================================================== }
  1293.     NOMENU      = $001F;
  1294.     NOITEM      = $003F;
  1295.     NOSUB       = $001F;
  1296.     MENUNULL    = -1;
  1297.  
  1298.  
  1299. { = =RJ='s peculiarities ================================================= }
  1300.  
  1301. { these defines are for the COMMSEQ and CHECKIT menu stuff.  If CHECKIT,
  1302.  * I'll use a generic Width (for all resolutions) for the CheckMark.
  1303.  * If COMMSEQ, likewise I'll use this generic stuff
  1304.  }
  1305.  
  1306.     CHECKWIDTH          = 19;
  1307.     COMMWIDTH           = 27;
  1308.     LOWCHECKWIDTH       = 13;
  1309.     LOWCOMMWIDTH        = 16;
  1310.  
  1311. { these are the AlertNumber defines.  if you are calling DisplayAlert()
  1312.  * the AlertNumber you supply must have the ALERT_TYPE bits set to one
  1313.  * of these patterns
  1314.  }
  1315.  
  1316.     ALERT_TYPE          = $80000000;
  1317.     RECOVERY_ALERT      = $00000000;    { the system can recover from this }
  1318.     DEADEND_ALERT       = $80000000;    { no recovery possible, this is it }
  1319.  
  1320.  
  1321. { When you're defining IntuiText for the Positive and Negative Gadgets 
  1322.  * created by a call to AutoRequest(), these defines will get you 
  1323.  * reasonable-looking text.  The only field without a define is the IText
  1324.  * field; you decide what text goes with the Gadget
  1325.  }
  1326.  
  1327.     AUTOFRONTPEN        = 0;
  1328.     AUTOBACKPEN         = 1;
  1329.     AUTODRAWMODE        = JAM2;
  1330.     AUTOLEFTEDGE        = 6;
  1331.     AUTOTOPEDGE         = 3;
  1332.     AUTOITEXTFONT       = Nil;
  1333.     AUTONEXTTEXT        = Nil;
  1334.  
  1335.  
  1336. { --- RAWMOUSE Codes and Qualifiers (Console OR IDCMP) ------------------- }
  1337.  
  1338.     SELECTUP            = IECODE_LBUTTON + IECODE_UP_PREFIX;
  1339.     SELECTDOWN          = IECODE_LBUTTON;
  1340.     MENUUP              = IECODE_RBUTTON + IECODE_UP_PREFIX;
  1341.     MENUDOWN            = IECODE_RBUTTON;
  1342.     ALTLEFT             = IEQUALIFIER_LALT;
  1343.     ALTRIGHT            = IEQUALIFIER_RALT;
  1344.     AMIGALEFT           = IEQUALIFIER_LCOMMAND;
  1345.     AMIGARIGHT          = IEQUALIFIER_RCOMMAND;
  1346.     AMIGAKEYS           = AMIGALEFT + AMIGARIGHT;
  1347.  
  1348.     CURSORUP            = $4C;
  1349.     CURSORLEFT          = $4F;
  1350.     CURSORRIGHT         = $4E;
  1351.     CURSORDOWN          = $4D;
  1352.     KEYCODE_Q           = $10;
  1353.     KEYCODE_X           = $32;
  1354.     KEYCODE_N           = $36;
  1355.     KEYCODE_M           = $37;
  1356.     KEYCODE_V           = $34;
  1357.     KEYCODE_B           = $35;
  1358.     KEYCODE_LESS        = $38;
  1359.     KEYCODE_GREATER     = $39;
  1360.  
  1361. {$I   "Include:Intuition/cgHooks.i"}
  1362. {$I   "Include:Intuition/Classes.i"}
  1363. {$I   "Include:Utility/Hooks.i"}
  1364.  
  1365. {$I   "Include:Intuition/Preferences.i"}
  1366. {$I   "Include:Intuition/Screens.i"}
  1367.  
  1368. { Include obsolete identifiers: }
  1369. {$I   "Include:Intuition/iobsolete.i"}
  1370.  
  1371. Function ActivateGadget(Gadget : GadgetPtr;
  1372.                         Window : WindowPtr;
  1373.                         Request : RequesterPtr) : Boolean;
  1374.     External;
  1375.  
  1376. Procedure ActivateWindow(Window : WindowPtr);
  1377.     External;
  1378.  
  1379. Function AddGadget(Window : WindowPtr;
  1380.                    Gadget : GadgetPtr;
  1381.                    Position : Short) : Short;
  1382.     External;
  1383.  
  1384.  
  1385. Function AddGList(Window : WindowPtr; Gadget : GadgetPtr;
  1386.                   Position : Short; Numgad : Short;
  1387.                   Requester : RequesterPtr) : Short;
  1388.     External;
  1389.  
  1390. Function AllocRemember(var RememberKey : RememberPtr;
  1391.                        Size, Flags : Integer) : Address;
  1392.     External;
  1393.  
  1394. Function AutoRequest(Window : WindowPtr;
  1395.                      BodyText, PositiveText, NegativeText : IntuiTextPtr;
  1396.                      PositiveFlags, NegativeFlags : Integer;
  1397.                      Width, Height : Short) : Boolean;
  1398.     External;
  1399.  
  1400. Procedure BeginRefresh(Window : WindowPtr);
  1401.     External;
  1402.  
  1403. Function BuildSysRequest(window : WindowPtr;
  1404.                         BodyText, PositiveText,NegativeText : IntuiTextPtr;
  1405.                         IDCMPFlags : Integer;
  1406.                         Width, Height : Short) : WindowPtr;
  1407.     External;
  1408.  
  1409. Function ClearDMRequest(window : WindowPtr) : Boolean;
  1410.     External;
  1411.  
  1412. Procedure ClearMenuStrip(window : WindowPtr);
  1413.     External;
  1414.  
  1415. Procedure ClearPointer(window : WindowPtr);
  1416.     External;
  1417.  
  1418. Procedure CloseScreen(screen : ScreenPtr);
  1419.     External;
  1420.  
  1421. Procedure CloseWindow(window : WindowPtr);
  1422.     External;
  1423.  
  1424. FUNCTION CloseWorkBench : Boolean;
  1425.     External;
  1426.  
  1427. Procedure CurrentTime(var Seconds, Micros : Integer);
  1428.     External;
  1429.  
  1430. Function DisplayAlert(AlertNumber : Integer;
  1431.                         Str : String; Height : Short) : Boolean;
  1432.     External;
  1433.  
  1434. Procedure DisplayBeep(screen : ScreenPtr);
  1435.     External;
  1436.  
  1437. Function DoubleClick(StartSecs, StartMicros,
  1438.                         CurrentSecs, CurrentMicros : Integer) : Boolean;
  1439.     External;
  1440.  
  1441. Procedure DrawBorder(rastport : RastPortPtr; Border : BorderPtr;
  1442.                         LeftOffset, TopOffset : Short);
  1443.     External;
  1444.  
  1445. Procedure DrawImage(rastport : RastPortPtr; Image : ImagePtr;
  1446.                         LeftOffset, TopOffset : Short);
  1447.     External;
  1448.  
  1449. Procedure EndRefresh(window : WindowPtr; Complete : Boolean);
  1450.     External;
  1451.  
  1452. Procedure EndRequest(requester : RequesterPtr; Window : WindowPtr);
  1453.     External;
  1454.  
  1455. Procedure FreeRemember(var RememberKey : RememberPtr; ReallyForget : Boolean);
  1456.     External;
  1457.  
  1458. Procedure FreeSysRequest(window : WindowPtr);
  1459.     External;
  1460.  
  1461. Function GetDefPrefs(PrefBuffer : PreferencesPtr;
  1462.                         Size : Short) : PreferencesPtr;
  1463.     External;
  1464.  
  1465. Function GetPrefs(PrefBuffer : PreferencesPtr; Size : Short) : PreferencesPtr;
  1466.     External;
  1467.  
  1468. Function GetScreenData(Buffer : Address; Size, SType : Short;
  1469.                         Screen : ScreenPtr) : Boolean;
  1470.     External;
  1471.  
  1472. Procedure InitRequester(requester : RequesterPtr);
  1473.     External;
  1474.  
  1475. Function IntuiTextLength(IText : IntuiTextPtr) : Integer;
  1476.     External;
  1477.  
  1478. Function ItemAddress(MenuStrip : MenuPtr; MenuNumber : Short) : MenuItemPtr;
  1479.     External;
  1480.  
  1481. Function ItemNum(MenuNumber : Short) : Short;
  1482.     External;
  1483.  
  1484. Function LockIBase(LockNumber : Integer) : Integer;
  1485.     External;
  1486.  
  1487. Procedure MakeScreen(Screen : ScreenPtr);
  1488.     External;
  1489.  
  1490. Function MenuNum(MenuNumber : Short) : Short;
  1491.     External;
  1492.  
  1493. Procedure ModifyIDCMP(window : WindowPtr; IDCMPFlags : Integer);
  1494.     External;
  1495.  
  1496. Procedure ModifyProp(gadget : GadgetPtr; window : WindowPtr;
  1497.                         requester : RequesterPtr; Flags : Short;
  1498.                         HorizPot, VertPot, HorizBody, VertBody : Short);
  1499.     External;
  1500.  
  1501. Procedure MoveScreen(screen : ScreenPtr; DeltaX, DeltaY : Short);
  1502.     External;
  1503.  
  1504. Procedure MoveWindow(window : WindowPtr; DeltaX, DeltaY : Short);
  1505.     External;
  1506.  
  1507. Procedure NewModifyProp(gadget : GadgetPtr; window : WindowPtr;
  1508.                         requester : RequesterPtr; Flags : Short;
  1509.                         HorizPot, VertPot, HorizBody, VertBody : Short;
  1510.                         NumGad : Integer);
  1511.     External;
  1512.  
  1513. Procedure OffGadget(gadget : GadgetPtr;
  1514.                         window : WindowPtr;
  1515.                         requester : RequesterPtr);
  1516.     External;
  1517.  
  1518. Procedure OffMenu(window : WindowPtr; MenuNumber : Short);
  1519.     External;
  1520.  
  1521. Procedure OnGadget(gadget : GadgetPtr;
  1522.                         window : WindowPtr;
  1523.                         requester : RequesterPtr);
  1524.     External;
  1525.  
  1526. Procedure OnMenu(window : WindowPtr; MenuNumber : Short);
  1527.     External;
  1528.  
  1529. Function OpenScreen(newscreen : NewScreenPtr) : ScreenPtr;
  1530.     External;
  1531.  
  1532. Function OpenWindow(newwindow : NewWindowPtr) : WindowPtr;
  1533.     External;
  1534.  
  1535. Function OpenWorkBench : ScreenPtr;
  1536.     External;
  1537.  
  1538. Procedure PrintIText(rastport : RastPortPtr; IText : IntuiTextPtr;
  1539.                         LeftOffset, TopOffset : Short);
  1540.     External;
  1541.  
  1542. Procedure RefreshGadgets(gadgets : GadgetPtr;
  1543.                         window : WindowPtr;
  1544.                         requester : RequesterPtr);
  1545.     External;
  1546.  
  1547. Procedure RefreshGList(gadgets : GadgetPtr; window : WindowPtr;
  1548.                         requester : RequesterPtr; NumGad : Short);
  1549.     External;
  1550.  
  1551. Procedure RefreshWindowFrame(window : WindowPtr);
  1552.     External;
  1553.  
  1554. Procedure RemakeDisplay;
  1555.     External;
  1556.  
  1557. Function RemoveGadget(window : WindowPtr; gadget : GadgetPtr) : Short;
  1558.     External;
  1559.  
  1560. Function RemoveGList(window : WindowPtr; gadget : GadgetPtr;
  1561.                         NumGad : Short) : Short;
  1562.     External;
  1563.  
  1564. Procedure ReportMouse(window : WindowPtr; DoIt : Boolean);
  1565.     External;
  1566.  
  1567. Function Request(requester : RequesterPtr; window : WindowPtr) : Boolean;
  1568.     External;
  1569.  
  1570. Procedure RethinkDisplay;
  1571.     External;
  1572.  
  1573. Procedure ScreenToBack(screen : ScreenPtr);
  1574.     External;
  1575.  
  1576. Procedure ScreenToFront(screen : ScreenPtr);
  1577.     External;
  1578.  
  1579. Procedure SetDMRequest(window : WindowPtr; DMRequester : RequesterPtr);
  1580.     External;
  1581.  
  1582. Function SetMenuStrip(window : WindowPtr; Menu : MenuPtr) : Boolean;
  1583.     External;
  1584.  
  1585. Procedure SetPointer(window : WindowPtr; pointer : Address;
  1586.                         Height, Width, XOffset, YOffset : Short);
  1587.     External;
  1588.  
  1589. Function SetPrefs(PrefBuffer : PreferencesPtr; Size : Integer;
  1590.                         Inform : Boolean) : PreferencesPtr;
  1591.     External;
  1592.     
  1593.  
  1594. Procedure SetWindowTitles(window : WindowPtr;
  1595.                         WindowTitle, ScreenTitle : String);
  1596.     External;
  1597.  
  1598. Procedure ShowTitle(screen : ScreenPtr; ShowIt : Boolean);
  1599.     External;
  1600.  
  1601. Procedure SizeWindow(window : WindowPtr; DeltaX, DeltaY : Short);
  1602.     External;
  1603.  
  1604. Function SubNum(MenuNumber : Short) : Short;
  1605.     External;
  1606.  
  1607. Procedure UnlockIBase(Lock : Integer);
  1608.     External;
  1609.  
  1610. Function ViewAddress : ViewPtr;
  1611.     External;
  1612.  
  1613. Function ViewPortAddress(window : WindowPtr) : ViewPortPtr;
  1614.     External;
  1615.  
  1616. Function WBenchToBack : Boolean;
  1617.     External;
  1618.  
  1619. Function WBenchToFront : Boolean;
  1620.     External;
  1621.  
  1622. Function WindowLimits(window : WindowPtr; MinWidth, MinHeight,
  1623.                         MaxWidth, MaxHeight : Short) : Boolean;
  1624.     External;
  1625.  
  1626. Procedure WindowToBack(window : WindowPtr);
  1627.     External;
  1628.  
  1629. Procedure WindowToFront(window : WindowPtr);
  1630.     External;
  1631.  
  1632.  
  1633.  
  1634. { --- functions in V36 OR higher (distributed as Release 2.0) ---  }
  1635.  
  1636. FUNCTION QueryOverscan(DisplayID : Integer; rect : RectAnglePtr; oScanType : Short) : Integer;
  1637.  External;
  1638.  
  1639. PROCEDURE MoveWindowInFrontOf(win : WindowPtr; behindWin : WindowPtr);
  1640.  External;
  1641.  
  1642. PROCEDURE ChangeWindowBox(win : WindowPtr;left,top,width,height : Short);
  1643.  External;
  1644.  
  1645. FUNCTION SetEditHook(h : HookPtr): HookPtr;
  1646.  External;
  1647.  
  1648. FUNCTION SetMouseQueue(win : WindowPtr; queueLength : Short) : Integer;
  1649.  External;
  1650.  
  1651. PROCEDURE ZipWindow(Win : windowPtr);
  1652.  External;
  1653.  
  1654. FUNCTION LockPubScreen(name : String) : ScreenPtr;
  1655.  External;
  1656.  
  1657. PROCEDURE UnlockPubScreen(name : String; Scr : screenPtr);
  1658.  External;
  1659.  
  1660. FUNCTION LockPubScreenList : ListPtr;
  1661.  External;
  1662.  
  1663. PROCEDURE UnlockPubScreenList;
  1664.  External;
  1665.  
  1666. FUNCTION NextPubScreen(Scr : screenPtr; VAR namebuf : String) : String;
  1667.  External;
  1668.  
  1669. PROCEDURE SetDefaultPubScreen(name : String);
  1670.  External;
  1671.  
  1672. FUNCTION SetPubScreenModes(modes : Short) : Short;
  1673.  External;
  1674.  
  1675. FUNCTION PubScreenStatus(Scr : screenPtr; statusFlags : Short) : Short;
  1676.  External;
  1677.  
  1678. FUNCTION ObtainGIRPort(gInfo : GadgetInfoPtr) : RastPortPtr;
  1679.  External;
  1680.  
  1681. PROCEDURE ReleaseGIRPort(rp : RastPortPtr);
  1682.  External;
  1683.  
  1684. PROCEDURE GadgetMouse(gad : GadgetPtr;gInfo : GadgetInfoPtr; mousePoint : Short);
  1685.  External;
  1686.  
  1687. PROCEDURE GetDefaultPubScreen(VAR nameBuffer : String);
  1688.  External;
  1689.  
  1690. FUNCTION EasyRequestArgs(win : WindowPtr;ES : EasyStructPtr; idcmp : Integer; args: Address) : WindowPtr;
  1691.  External;
  1692.  
  1693. FUNCTION BuildEasyRequestArgs(Win : WindowPtr;ES : easyStructPtr;idcmp : Integer; args : Address) : WindowPtr;
  1694.  External;
  1695.  
  1696. FUNCTION SysReqHandler(Win : windowPtr; idcmp : Integer; waitInput : Boolean) : Integer;
  1697.  External;
  1698.  
  1699. FUNCTION OpenWindowTagList(nw : newWindowPtr; TagList : Address) : WindowPtr;
  1700.  External;
  1701.  
  1702. FUNCTION OpenScreenTagList(ns : newScreenPtr; tagList : Address) : ScreenPtr;
  1703.  External;
  1704.  
  1705. PROCEDURE DrawImageState(rp : RastPortPtr; im : ImagePtr; leftOffset,topOffset : Short; state : Integer; di : Address);
  1706.  External;                                                                                               { DrawInfoPtr }
  1707.  
  1708. FUNCTION PointInImage(p : point; im : imagePtr) : Boolean;
  1709.  External;
  1710.  
  1711. PROCEDURE EraseImage(rp : RastPortPtr; im : imagePtr; leftOffset,topOffset : Short);
  1712.  External;
  1713.  
  1714. FUNCTION NewObjectA(class : IClassPtr; classID : String; tagList : Address) : Address;
  1715.  External;
  1716.  
  1717. PROCEDURE DisposeObject(object : Address);
  1718.  External;
  1719.  
  1720. FUNCTION SetAttrsA(object : Address; tagList : Address) : Integer;
  1721.  External;
  1722.  
  1723. FUNCTION GetAttr(attrID : Integer; object : Address; storage : Address) : Integer;
  1724.  External;
  1725.  
  1726. FUNCTION SetGadgetAttrsA(Gad : gadgetPtr; Win : windowPtr; Req : requesterPtr; tagList : Address) : Integer;
  1727.  External;
  1728.  
  1729. FUNCTION NextObject(object : Address) : Address;
  1730.  External;
  1731.  
  1732. FUNCTION MakeClass(classID : String; superClassID : String; superClass : IClassPtr; instanceSize : Short; flags : Integer) : IClassPtr;
  1733.  External;
  1734.  
  1735. PROCEDURE AddClass(class : IClassPtr);
  1736.  External;
  1737.  
  1738. FUNCTION GetScreenDrawInfo(Scr : screenPtr) : Address;
  1739.  External;                                    { DrawInfoPtr }
  1740.  
  1741. PROCEDURE FreeScreenDrawInfo(Scr : screenPtr; di : Address);
  1742.  External;                                         { DrawInfoPtr }
  1743.  
  1744. FUNCTION ResetMenuStrip(Win : windowPtr; m : menuPtr) : Boolean;
  1745.  External;
  1746.  
  1747. PROCEDURE RemoveClass(class : IClassPtr);
  1748.  External;
  1749.  
  1750. FUNCTION FreeClass(class : IClassPtr) : Boolean;
  1751.  External;
  1752.  
  1753.  
  1754.  
  1755.